home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 21
/
Cream of the Crop 21 (Terry Blount) (October 1996).iso
/
bbs
/
tmg105b2.zip
/
SCRIPTS.DOC
< prev
next >
Wrap
Text File
|
1996-08-03
|
62KB
|
1,399 lines
SCRIPTS.DOC Page 1
╒═════════════════════════════════════════════════════════════════════════╕
│ The Magic Gate version 1.05 │
│ Documentation August '96 │
│ (C) Copyright 1995, 1996 All Rights Reserved │
│ Joseph O'Connor │
╘═════════════════════════════════════════════════════════════════════════╛
This game may be distributed in its original, unmodified form as
long as no money is made off of it. Please do not include the contents
of this archive in any CD, collection, or whatever without express written
permission of ME!
This file was written for all you gamers out there who want to have a
custom game going on on your system. Contained within are the secrets of
the universe.... No wait, that was the other document, this one has all the
information you will need to write areas for Magic Gate. What you will find
will shock, will stun, will even AMAZE you, so true believers, sit back and
enjoy the ride.
─═════════════════════════════════════════════════════════════════════════─
Introduction:
As you may, or may not know, The Magic Gate supports EXternal MODuleS which
can be written by anyone in any language whatsoever and you get to mess with
drop files and writing your own routines for things I've already done.
Don't get me wrong, that is the best route to go if you want to do something
totally slick and new. But if you don't need all the bells, whistles and
power of say, Turbo Pascal, C++ etc, you can still add something 100% unique
to your game. The answer lies within the power of ASCII scripts which can
be written with any word processor or text editor. This is new as of
version 1.02, but I have written several test scripts to test it as thorough
as possible. First I will go through the pre-defined variables and what
they reference, then a list of predefined commands, using examples if I
feel like it ;) etc... hopefully by the end you will understand enough of
the language to write a script. (I need to have more programmer friends,
all of the friends I had look at this had their head explode... <G>)
SCRIPTS.DOC Page 2
─═════════════════════════════════════════════════════════════════════════─
All about Variables:
Variables are EVERYWHERE. (Don't make me give examples..) TMG Scripting
Language (TMGSL?? whatever) has a bunch of variables, and a bunch of funny
looking strings that represent variables. There are 20 variables each,
of 80 bytes (characters) in length which can be used to store both numerical
and textual data (Don't ask me how it works, it just does). As well as
29 variables which are either 1 (On) or 0 (Off) or 2 (Maybe) (nevermind)...
These variables, and their contents can be accessed via escape codes in
the ASCII script file. It's example time kiddies! Okay, say you wanted
to print how much gold the character currently had on him/her. You would
write a line in the script file that looked just like this:
Writeln "Gold on Hand : ^CS18"
Say the character had 386 gold on had, the line would look like this:
Gold on Hand : 386
Amazing, isn't it? Don't worry about each command just yet, the variables
are what is going to make the program go... You can check the contents of
variables conditionally as well. You could check to see if the player had
any creature fights and then perform a certain action easily by doing
something like this:
If ^CS26 > 0
Writeln "You Have ^CS26 creature fights left today."
Endif
If the player doesn't have any forest fights left, then the Writeln statement
will not be executed, and neither would enything before the Endif.
Hopefully the fog is starting to lift from your brain and things have
become much clearer. No? Well, this is only Page 2
SCRIPTS.DOC Page 3
─═════════════════════════════════════════════════════════════════════════─
Variables of Gender :
^CA Character Name
^CB male/female, based on sex of character
^CC son/daughter, based on sex of character
^CD his/her, based on sex of character
^CE he/she, based on sex of character
^CF him/her, based on sex of character
^CG sir/ma'am, based on sex of character
^DA Name of Character's master
^DB male/female, based on sex of characters master
^DC son/daughter, based on sex of characters master
^DD his/her, based on sex of characters master
^DE he/she, based on sex of characters master
^DF him/her, based on sex of characters master
^DG sir/ma'am, based on sex of characters master
Using just these variables, you can make menus look gramatically correct
for EVERY character. Say you wanted to have a few lines of text, whether
its in a menu, or in Write/Writeln statements, that gives the person the
idea that they are going up to their master and kneeling at his/her feet.
Do something Just like this:
Writeln " You go up to ^DA and kneel at ^DD feet."
Writeln " ^DA acknowledges you and says :"
Writeln " 'What can I do for you my ^CC?'"
Lets use Martissa as your master, mastissa is female. You are Bob, you are
male. These 3 lines would look like this:
You go up to Martissa and kneel at her feet.
Martissa acknowledges you and says :
'What can I do for you my son?'
The pronouns will change based on gender and all that good gramatically
correct stuff.
That's some pretty nifty stuff, but it doesn't just stop there... I am
sure you will need to do a few more things with characters information
aside from what their gender is.
SCRIPTS.DOC Page 4
─═════════════════════════════════════════════════════════════════════════─
About Character Related Variables:
All of the following commands will give you some sort of information
about the character. This all can be used just as has been described
before. These can also be modified using the commands in the script.
(Like ADD and SET). Obviously, string variables cannot be added to, but
can still be SET, (using SETSTR). I don't allow scripts to change :
A.)Characters Real Name, or B.)Characters Level in any way shape or form.
Some of these variables I don't allow a SET command to be used on simply
because I'd rather you just Added to and subtracted from. There are only
three (Attack,Defense, and Damage Reduction) so when you go to
Set ^CS03 4500
and it doesn't do anything, you'll know why. The following is legal, though
Add ^CS03 4500
It will add 4500 to attack, so I'm relying on you script writers not to
make the game too easy.
Some of the variables work differently whether you are modifying it or just
displaying it. The variable for guild is a good example.
^CS09 Will give you the name of the guild when used in a Write/Writeln
but the guild number is used everywhere else ^CS09 is found.
Refer to the next page for details on all the variables.
SCRIPTS.DOC Page 5
─═════════════════════════════════════════════════════════════════════════─
^CS Variables : Their Numbers and their Meanings
^CS01 Name (same as ^CA)
^CS02 *Real Name*
You cannot modify this variable at all.
Can only use in a Write type command or comparison.
^CS03 Attack Value
You cannot use the Set command on this variable
^CS04 Defense Value
You cannot use the Set command on this variable
^CS05 Damage Reduction Value
You cannot use the Set command on this